import service from "@/service";

//导出
export function exportMonitoringHj(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-hj-data/downLoadHjList`,
    method: "GET",
    apiType: "file",
    responseType: "arraybuffer",
    params,
  });
}

//环境监测-列表
export function getMonitoringHjList(data) {
  let { secCode, equCode, endTime, startTime, type, page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-hj-data/hjList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data: {
      secCode,
      equCode,
      startTime,
      endTime,
      type,
    },
  });
}

//查询有数据的日期数据
export function getHjJcQueryDate(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-hj-data/queryDate`,
    method: "GET",
    params,
  });
}

//根据设备编号 查询预警阀值
export function getQueryWarnCfgByEquCode(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-hj-data/queryWarnCfgByEquCode`,
    method: "GET",
    params,
  });
}

//保存预警阀值
export function getSaveWarnCfg(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-hj-data/saveWarnCfg`,
    method: "POST",
    params,
  });
}

//用水监测-列表
export function getZhYsList(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-meter-data/meterDataSumList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}
//用水监测-导出
export function exportZHYSData(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-meter-data/downLoadList`,
    method: "GET",
    apiType: "file",
    responseType: "arraybuffer",
    params,
  });
}
//用水监测-详情
export function getZhYsDetail(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-meter-data/meterDataList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}

//用电监测-列表
export function getZhYdList(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-zhyd-data/znydList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}
//用电监测-导出
export function exportZHYDData(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-zhyd-data/downLoadList`,
    method: "GET",
    apiType: "file",
    responseType: "arraybuffer",
    params,
  });
}
//用电监测-数据明细
export function getZhYdDetail(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/quality-zhyd-data/znydDetailList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}
